import request from '@/utils/request'

// 获取设备状态下拉列表
export function getEquipmentStatusList() {
  return request({
    url: '/operation/web/order/equipmentStatusList',
    method: 'get'
  })
}

// 查询设备申购主列表
export function listPurchaseOrder(params) {
  return request({
    url: '/operation/web/order/list',
    method: 'get',
    params
  })
}

// 获取设备申购主详细信息
export function getPurchaseOrderDetail(id) {
  return request({
    url: `/operation/web/order/${id}`,
    method: 'get'
  })
}

// 新增设备申购主
export function addPurchaseOrder(data) {
  return request({
    url: '/operation/web/order',
    method: 'post',
    data
  })
}

// 修改设备申购主
export function updatePurchaseOrder(data) {
  return request({
    url: '/operation/web/order',
    method: 'put',
    data
  })
}

// 删除设备申购主
export function deletePurchaseOrder(ids) {
  return request({
    url: `/operation/web/order/${ids}`,
    method: 'delete'
  })
}

// 审核设备申购主
export function auditPurchaseOrder(data) {
  return request({
    url: '/operation/web/order/audit',
    method: 'put',
    data
  })
}


// 获取员工下拉列表
export function getEmployeeList() {
  return request({
    url: '/operation/web/schedules/userList',
    method: 'get'
  })
}


// 查询部门树结构信息 Copy
export function getDeptTree() {
  return request({
    url: '/basic/web/employee/deptTree',
    method: 'get'
  })
}